home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / pbm / pbm_man.zoo / man5 / pbm.5 next >
Text File  |  1994-08-27  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. pbm(5)                    FILE FORMATS                     pbm(5)
  5.  
  6.  
  7.  
  8. NAME
  9.      pbm - portable bitmap file format
  10.  
  11. DESCRIPTION
  12.      The portable bitmap format is a  lowest  common  denominator
  13.      monochrome  file format.  It was originally designed to make
  14.      it reasonable to mail bitmaps  between  different  types  of
  15.      machines  using  the  typical stupid network mailers we have
  16.      today.  Now it serves as the common language of a large fam-
  17.      ily of bitmap conversion filters.  The definition is as fol-
  18.      lows:
  19.  
  20.      - A "magic number" for identifying the  file  type.   A  pbm
  21.        file's magic number is the two characters "P1".
  22.  
  23.      - Whitespace (blanks, TABs, CRs, LFs).
  24.  
  25.      - A width, formatted as ASCII characters in decimal.
  26.  
  27.      - Whitespace.
  28.  
  29.      - A height, again in ASCII decimal.
  30.  
  31.      - Whitespace.
  32.  
  33.      - Width * height bits, each either '1' or '0',  starting  at
  34.        the  top-left  corner  of  the bitmap, proceding in normal
  35.        English reading order.
  36.  
  37.      - The character '1' means black, '0' means white.
  38.  
  39.      - Whitespace in the bits section is ignored.
  40.  
  41.      - Characters from a "#" to the next end-of-line are  ignored
  42.        (comments).
  43.  
  44.      - No line should be longer than 70 characters.
  45.  
  46.      Here is an example of a small bitmap in this format:
  47.      P1
  48.      # feep.pbm
  49.      24 7
  50.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  51.      0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  52.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  53.      0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  54.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  55.      0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  56.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  57.  
  58.      Programs that read this format should be as lenient as  pos-
  59.      sible, accepting anything that looks remotely like a bitmap.
  60.  
  61.  
  62.  
  63. Sun Release 4.0  Last change: 21 September 1989                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. pbm(5)                    FILE FORMATS                     pbm(5)
  71.  
  72.  
  73.  
  74.      There is also a variant on the format, available by  setting
  75.      the  RAWBITS  option  at compile time.  This variant is dif-
  76.      ferent in the following ways:
  77.  
  78.      - The "magic number" is "P4" instead of "P1".
  79.  
  80.      - The bits are stored eight per byte, high bit first low bit
  81.        last.
  82.  
  83.      - No whitespace is allowed in the bits section, and  only  a
  84.        single  character  of  whitespace (typically a newline) is
  85.        allowed after the height.
  86.  
  87.      - The files are eight times smaller and many times faster to
  88.        read and write.
  89.  
  90. SEE ALSO
  91.      brushtopbm(1), cmuwmtopbm(1), g3topbm(1), gemtopbm(1), icon-
  92.      topbm(1),     macptopbm(1),     mgrtopbm(1),    pi3topbm(1),
  93.      xbmtopbm(1),   ybmtopbm(1),   pbmto10x(1),    pbmtoascii(1),
  94.      pbmtobbnbg(1),   pbmtocmuwm(1),  pbmtoepson(1),  pbmtog3(1),
  95.      pbmtogem(1),    pbmtogo(1),    pbmtoicon(1),     pbmtolj(1),
  96.      pbmtomacp(1),    pbmtomgr(1),   pbmtopi3(1),   pbmtoplot(1),
  97.      pbmtoptx(1), pbmtox10bm(1), pbmtoxbm(1), pbmtoybm(1), pbmto-
  98.      zinc(1),  pbmlife(1),  pbmmake(1),  pbmmask(1), pbmpaste(1),
  99.      pbmreduce(1), pbmtext(1), pbmupc(1), pnm(5), pgm(5), ppm(5)
  100.  
  101. AUTHOR
  102.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sun Release 4.0  Last change: 21 September 1989                 2
  130.  
  131.  
  132.  
  133.